/*
 * @Author: yanjikun
 * @Date: 2021-05-28 13:53:25
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-05-11 17:27:58
 * @Description: file content
 */
import { createApp } from 'vue'
import { setupStore } from '@/store'
import router, { setupRouter } from '@/router'
import App from './App.vue'
import { setupSvgIcon } from './components/SvgIcon'
import { setupGlobalMethods } from './plugins/globalMethods'
import { setupAssets } from './plugins/assets'
import { setupVueAmap } from './plugins/vueAmap'
import { setupAntd } from './plugins/antd'
const app = createApp(App)

function setupPlugins() {
  // 注册全局方法，如：app.config.globalProperties.$message = message
  setupGlobalMethods(app)
  setupAntd(app)
  setupAssets()
  setupVueAmap()
}
async function setupApp() {
  setupStore(app)
  setupRouter(app)
  setupSvgIcon(app)
  router.isReady().then(() => app.mount('#app'))
}

setupPlugins()
setupApp()
